﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI;

/// <summary>
/// Summary description for GridViewModel
/// </summary>
public class GridViewModel:UserControl
{
    protected void onLoadData(object sender, EventArgs e) {
        var gv = sender as GridView;
        if (gv != null) {
            gv.DataSource = new List<UserInfo> { 
                new UserInfo{Name="Levin",Age=18},
                new UserInfo{Name="Cocoa",Age=16}
            };
            gv.DataBind();
        }
    }
}
